/**
 * 股票信息模块通用样式
 * 为股票信息面板提供一致的视觉效果和响应式设计
 */

/* 通用变量 */
:root {
  --stock-primary-color: #409eff;
  --stock-success-color: #67c23a;
  --stock-danger-color: #f56c6c;
  --stock-warning-color: #e6a23c;
  --stock-info-color: #909399;
  
  --stock-bg-color: #ffffff;
  --stock-border-color: #e4e7ed;
  --stock-text-primary: #303133;
  --stock-text-regular: #606266;
  --stock-text-secondary: #909399;
  
  --stock-border-radius: 12px;
  --stock-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --stock-box-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.12);
  
  --stock-transition: all 0.3s ease;
  --stock-transition-fast: all 0.2s ease;
}



/* 通用工具类 */
.stock-fade-in {
  animation: stockFadeIn 0.5s ease-in-out;
}

.stock-slide-up {
  animation: stockSlideUp 0.4s ease-out;
}

.stock-pulse {
  animation: stockPulse 2s infinite;
}

/* 动画定义 */
@keyframes stockFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stockSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stockPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

/* 涨跌颜色工具类 */
.stock-price-up {
  color: var(--stock-danger-color) !important;
  font-weight: 800 !important;
}

.stock-price-down {
  color: var(--stock-success-color) !important;
  font-weight: 800 !important;
}

.stock-price-neutral {
  color: var(--stock-info-color) !important;
  font-weight: 600 !important;
}

/* 显示工具类 */
.stock-hide-mobile {
  display: block;
}

.stock-hide-desktop {
  display: none;
}

/* 手机端响应式布局工具类 */
@media (max-width: 768px) {
  .stock-hide-mobile {
    display: none !important;
  }
  
  .stock-hide-desktop {
    display: block !important;
  }
  
  .stock-full-width-mobile {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .stock-center-mobile {
    text-align: center !important;
  }
  
  .stock-small-padding-mobile {
    padding: 8px 12px !important;
  }
  
  .stock-compact-mobile {
    margin: 0 !important;
    padding: 4px 8px !important;
  }
}

/* 手机端文字大小调整 */
@media (max-width: 480px) {
  .stock-text-lg-mobile {
    font-size: 14px !important;
  }
  
  .stock-text-md-mobile {
    font-size: 13px !important;
  }
  
  .stock-text-sm-mobile {
    font-size: 12px !important;
  }
}





/* 打印样式 */
@media print {
  .stock-info-panel {
    box-shadow: none !important;
    border: 1px solid #000 !important;
  }
  
  .info-module {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #000 !important;
  }
  
  .stock-price-up,
  .stock-price-down,
  .stock-price-neutral {
    color: #000 !important;
    background: none !important;
  }
}